package com.yuju.login.enums;
/**
 * 
 * 类名：OpHotelReturnCodeEnum  <br />
 *
 * 功能：
 *
 * @author : zhousc <br />
 * @Date : 2017年12月4日 上午10:39:49  <br />
 * @version : 1.1 <br />
 */
public enum OpHotelReturnCodeEnum {
	OPHOTEL_QUERY_SUCCESS("yuju-opHotel-1000", "账户数据范围查询成功"),
	OPHOTEL_QUERY_FAILURE("yuju-opHotel-1001", "账户数据范围查询失败"),
	OPHOTEL_SAVE_SUCCESS("yuju-opHotel-1002", "账户数据范围保存成功"),
	OPHOTEL_SAVE_FAILURE("yuju-opHotel-1003", "账户数据范围保存失败"),
	OPHOTEL_UPDATE_SUCCESS("yuju-opHotel-1004", "账户数据范围更新成功"),
	OPHOTEL_UPDATE_FAILURE("yuju-opHotel-1005", "账户数据范围更新失败"),
	OPHOTEL_DEL_SUCCESS("yuju-opHotel-1006", "账户数据范围删除成功"),
	OPHOTEL_DEL_FAILURE("yuju-opHotel-1007", "账户数据范围删除失败");
	
	private String code;
	private String desc;
	
	OpHotelReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (OpHotelReturnCodeEnum enume : OpHotelReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}